<%@page import="java.util.ArrayList"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" errorPage="err.jsp"%>
<jsp:include page="lock.jsp"></jsp:include>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>修改密码</title>
<style>
.txt20 {
	font-size: 20px;
}

.td {
	font-size: 18px;
	height: 50px;
	text-align: right;
}
</style>
</head>
<body>
	<div class="txt20">当前位置-->修改密码</div>
	<%
		request.setCharacterEncoding("UTF-8");
		//判断错误信息
		ArrayList<Integer> errlist = new ArrayList<Integer>();
		if (request.getAttribute("errinfo") != null) {
			errlist = (ArrayList<Integer>) request.getAttribute("errinfo");
		}
	%>

	<form action="doalterpass.jsp" method="post">
		<table width="95%" cellspacing="1" cellpadding="0" align="center"
			style="background-color: azure">
			<tr>
				<td colspan="2" height="30px"></td>
			</tr>
			<tr>
				<td class="td">原密码：</td>
				<td><input type="password" name="userpass"> <%
 	for (int i = 0; i < errlist.size(); i++) {
 		if (errlist.get(i) == 1) {
 			out.println("<span class=\"star\">*请输入原密码。</span>");
 			break;
 		}
 	}
 %></td>
			</tr>
			<tr>
				<td class="td">新密码：</td>
				<td><input type="password" name="usernewpass"> <%
 	for (int i = 0; i < errlist.size(); i++) {
 		if (errlist.get(i) == 2) {
 			out.println("<span class=\"star\">*请输入新密码。</span>");
 			break;
 		}
 	}
 %></td>
			</tr>
			<tr>
				<td class="td">确认新密码：</td>
				<td><input type="password" name="comusernewpass"> <%
 	for (int i = 0; i < errlist.size(); i++) {
 		if (errlist.get(i) == 3) {
 			out.println("<span class=\"star\">*确认新密码。</span>");
 			break;
 		}
 		if (errlist.get(i) == 3) {
 			out.println("<span class=\"star\">*密码输入不匹配。</span>");
 			break;
 		}
 	}
 %></td>
			</tr>
			<tr>
				<td></td>
				<td height="50px"><input type="submit" name="submit" value="提交"
					style="width: 100px; height: 25px"></td>
			</tr>
		</table>
	</form>
</body>
</html>